//
//  StrategyCell.m
//  FreeTrip
//
//  Created by 邓芮 on 15/11/25.
//  Copyright © 2015年 邓芮. All rights reserved.
//

#import "StrategyCell.h"

@interface StrategyCell ()
@property (nonatomic, strong) UILabel *label;
@end

@implementation StrategyCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        CGFloat x = 20 * KScreenWidth / 414;
        CGFloat width = frame.size.width - x - 10 * KScreenWidth / 414;
//        NSLog(@"%f", width);
        self.label = [[UILabel alloc]initWithFrame:CGRectMake(x, 0, width, frame.size.height)];
//        self.label.backgroundColor = [UIColor redColor];
        self.label.textAlignment = NSTextAlignmentLeft;
        self.label.textColor = [UIColor grayColor];
        self.label.font = [UIFont systemFontOfSize:19 * KScreenWidth/414];
        [self.contentView addSubview:self.label];
    }
    return self;
}

- (void)setModel:(StrategyModel *)model
{
    _model = model;
    self.label.text = model.title;
}

@end
